package com.hzlx.controller;

import com.hzlx.service.UserInfoService;
import com.hzlx.service.impl.UserInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 86166
 * @version 1.0
 * @description: TODO
 * @date 2023/4/12 16:08
 */
@WebServlet(urlPatterns = "/userLogin.do")
public class UserLoginController extends HttpServlet {
    UserInfoService userInfoService = new UserInfoServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String url = userInfoService.login(req,resp);
        req.getRequestDispatcher(url).forward(req,resp);
    }
}
